package com.dance.spring.learn.testdemo;

import com.dance.spring.learn.jdbc.config.SpringJdbcConfig;
import com.dance.spring.learn.jdbc.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
// 使用value 指定xml也可以使用classes指定配置类
@ContextConfiguration(classes = SpringJdbcConfig.class)
public class JTest4 {

    @Autowired
    private UserService userService;

    @Test
    public void test(){
        userService.accountMoney();
    }

}
